﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:myBoardControls="clr-namespace:myBoard.App.Controls"
    xmlns:myBoard_App_Model="clr-namespace:myBoard.App.Model" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    x:Class="myBoard.App.Controls.LocalMagnetsExplorer"
    Width="649" Height="116" x:Name="UserControl">
	<UserControl.Resources>
		<Style x:Key="ButtonFocusVisual">
			<Setter Property="Control.Template">
				<Setter.Value>
					<ControlTemplate>
						<Rectangle SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="2"/>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#F3F3F3" Offset="0"/>
			<GradientStop Color="#EBEBEB" Offset="0.5"/>
			<GradientStop Color="#DDDDDD" Offset="0.5"/>
			<GradientStop Color="#CDCDCD" Offset="1"/>
		</LinearGradientBrush>
		<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
		<Style x:Key="_hideShowLibButStyle" TargetType="{x:Type Button}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Grid Width="30" Height="30">
							<Ellipse Fill="#59000000" Stroke="#E5FFFFFF" StrokeThickness="2.5"/>
							<Path RenderTransformOrigin="0.5,0.5" Fill="#59000000" Stretch="Fill" Stroke="#E5FFFFFF" StrokeDashCap="Flat" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="2.5" HorizontalAlignment="Center" Margin="0,5,0,5" x:Name="path" VerticalAlignment="Center" Data="M15,4.625 L15,25.259468">
								<Path.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleX="1" ScaleY="1"/>
										<SkewTransform AngleX="0" AngleY="0"/>
										<RotateTransform Angle="0"/>
										<TranslateTransform X="0" Y="0"/>
									</TransformGroup>
								</Path.RenderTransform>
							</Path>
							<Path Fill="#59000000" Stretch="Fill" Stroke="#E5FFFFFF" StrokeDashCap="Flat" StrokeEndLineCap="Round" StrokeStartLineCap="Round" StrokeThickness="2.5" Data="M15,4.625 L15,25.259468" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" x:Name="path1" VerticalAlignment="Center" Height="19.8">
								<Path.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleX="1" ScaleY="1"/>
										<SkewTransform AngleX="0" AngleY="0"/>
										<RotateTransform Angle="90"/>
										<TranslateTransform X="0" Y="0"/>
									</TransformGroup>
								</Path.RenderTransform>
							</Path>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="ToggleButton.IsChecked" Value="true"/>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Key="RotateToCrossForm">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_hideShowLibBut" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-135"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_storeBt" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_storeBt" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="00:00:00.5000000" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="RotateToNormalForm">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_hideShowLibBut" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_storeBt" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_storeBt" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="00:00:00.5000000" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<myBoard_App_Model:Instances x:Key="InstancesDataSource" d:IsDataSource="True"/>
		<DataTemplate x:Key="MagnetDataTemplate">
			<DataTemplate.Resources>
				<Storyboard x:Key="ShowRemoveBt">
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_removeMgtBt" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
						<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.3000000" Value="0"/>
					</DoubleAnimationUsingKeyFrames>
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_removeMgtBt" Storyboard.TargetProperty="(UIElement.Opacity)">
						<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.3000000" Value="1"/>
					</DoubleAnimationUsingKeyFrames>
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_magnetName" Storyboard.TargetProperty="(UIElement.Opacity)">
						<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0" KeySpline="1,0,1,1"/>
					</DoubleAnimationUsingKeyFrames>
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_magnetName" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
						<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="20" KeySpline="1,0,1,1"/>
					</DoubleAnimationUsingKeyFrames>
				</Storyboard>
				<Storyboard x:Key="HideRemoveBt">
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_removeMgtBt" Storyboard.TargetProperty="(UIElement.Opacity)">
						<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.2000000" Value="0"/>
					</DoubleAnimationUsingKeyFrames>
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_removeMgtBt" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
						<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.2000000" Value="20"/>
					</DoubleAnimationUsingKeyFrames>
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_magnetName" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
						<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.3000000" Value="0"/>
					</DoubleAnimationUsingKeyFrames>
					<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_magnetName" Storyboard.TargetProperty="(UIElement.Opacity)">
						<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.3000000" Value="1"/>
					</DoubleAnimationUsingKeyFrames>
				</Storyboard>
			</DataTemplate.Resources>
			<StackPanel x:Name="_root" Width="90" Height="Auto" d:LayoutOverrides="Width" Margin="0,13,0,0">
				<StackPanel.Background>
					<SolidColorBrush/>
				</StackPanel.Background>
				<Image x:Name="_magnetIcon" Height="70" Source="{Binding Path=Icon, Mode=Default}" Width="70" Stretch="Uniform" MouseLeftButtonDown="_magnetIcon_MouseLeftButtonDown">
					<Image.Effect>
						<DropShadowEffect BlurRadius="2" ShadowDepth="4" Opacity="0.595"/>
					</Image.Effect>
				</Image>
				<Grid Height="Auto" Margin="0,12,0,0" VerticalAlignment="Stretch">
					<Label HorizontalAlignment="Center" VerticalAlignment="Stretch" Content="{Binding Path=MagnetName, Mode=Default}" Background="#003D3D3D" FontFamily="Calibri" FontWeight="Bold" Foreground="#FF000000" x:Name="_magnetName" Padding="5,0,5,0" FontSize="14" RenderTransformOrigin="0.5,0.5">
						<Label.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Label.RenderTransform>
						<Label.Effect>
							<DropShadowEffect Color="#FFFFFFFF" BlurRadius="0" ShadowDepth="0.6" Direction="270"/>
						</Label.Effect>
					</Label>
					<Button x:Name="_removeMgtBt" Margin="0" Content="remove" HorizontalAlignment="Center" Width="60" VerticalAlignment="Center" Style="{DynamicResource DeleteMagnetButtonStyle}" Foreground="White" Padding="1,0" BorderBrush="{x:Null}" FontFamily="Calibri" Height="Auto" FontWeight="Normal" Cursor="Hand" ToolTip="Permanently delete this magnet." RenderTransformOrigin="0.5,0.5" Opacity="0" Click="_removeMgtBt_Click">
						<Button.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform Y="20"/>
							</TransformGroup>
						</Button.RenderTransform>
						<Button.Effect>
							<DropShadowEffect Opacity="0.395" BlurRadius="10"/>
						</Button.Effect>
						<Button.Background>
							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
								<GradientStop Color="#FF4F0D0D" Offset="1"/>
								<GradientStop Color="#FFF62E2E"/>
								<GradientStop Color="#FF861616" Offset="0.501"/>
								<GradientStop Color="#FF510707" Offset="0.502"/>
							</LinearGradientBrush>
						</Button.Background>
					</Button>
				</Grid>
			</StackPanel>
			<DataTemplate.Triggers>
				<EventTrigger RoutedEvent="Mouse.MouseEnter">
					<BeginStoryboard Storyboard="{StaticResource ShowRemoveBt}"/>
				</EventTrigger>
				<EventTrigger RoutedEvent="Mouse.MouseLeave">
					<BeginStoryboard x:Name="HideRemoveBt_BeginStoryboard" Storyboard="{StaticResource HideRemoveBt}"/>
				</EventTrigger>
			</DataTemplate.Triggers>
		</DataTemplate>
		<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="Padding" Value="2,0,0,0"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListBoxItem}">
						<Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<SolidColorBrush x:Key="ListBorder" Color="#828790"/>
		<Style x:Key="ListBoxStyle1" TargetType="{x:Type ListBox}">
			<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ListBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
			<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
			<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListBox}">
						<Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1">
							<ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false" Template="{DynamicResource ScrollViewerControlTemplate1}">
								<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
							</ScrollViewer>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
							</Trigger>
							<Trigger Property="IsGrouping" Value="true">
								<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<ControlTemplate x:Key="ScrollViewerControlTemplate1" TargetType="{x:Type ScrollViewer}">
			<Grid x:Name="Grid" Background="{TemplateBinding Background}">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="Auto"/>
				</Grid.ColumnDefinitions>
				<Grid.RowDefinitions>
					<RowDefinition Height="*"/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<Rectangle x:Name="Corner" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Column="1" Grid.Row="1"/>
				<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" Margin="{TemplateBinding Padding}" Grid.Column="0" Grid.Row="0" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False"/>
				<ScrollBar x:Name="PART_VerticalScrollBar" Cursor="Arrow" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" AutomationProperties.AutomationId="VerticalScrollBar" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
				<ScrollBar x:Name="PART_HorizontalScrollBar" Cursor="Arrow" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" AutomationProperties.AutomationId="HorizontalScrollBar" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}"/>
			</Grid>
		</ControlTemplate>
		<ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
			<VirtualizingStackPanel IsItemsHost="True" Orientation="Horizontal"/>
		</ItemsPanelTemplate>
		<Storyboard x:Key="ShowMagnets">
			<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_magnetsList" Storyboard.TargetProperty="(FrameworkElement.Margin)">
				<SplineThicknessKeyFrame KeyTime="00:00:00.5000000" Value="0,0,0,0" KeySpline="0,1,1,1"/>
			</ThicknessAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="HideMagnets">
			<ThicknessAnimationUsingKeyFrames x:Name="ThicknessAnimation" BeginTime="00:00:00" Storyboard.TargetName="_magnetsList" Storyboard.TargetProperty="(FrameworkElement.Margin)">
				<SplineThicknessKeyFrame KeyTime="00:00:00.3000000" Value="-187,0,0,0" KeySpline="1,0,1,1"/>
			</ThicknessAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="MoveNext">
			<ThicknessAnimationUsingKeyFrames x:Name="MoveNextMarginTimeline" BeginTime="00:00:00" Storyboard.TargetName="_magnetsList" Storyboard.TargetProperty="(FrameworkElement.Margin)">
				<SplineThicknessKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.5000000" Value="-200,0,0,0"/>
			</ThicknessAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="MovePrevious">
			<ThicknessAnimationUsingKeyFrames x:Name="MovePreviousMarginTimeline" BeginTime="00:00:00" Storyboard.TargetName="_magnetsList" Storyboard.TargetProperty="(FrameworkElement.Margin)">
				<SplineThicknessKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.5000000" Value="636,0,0,0"/>
			</ThicknessAnimationUsingKeyFrames>
		</Storyboard>
		<Style x:Key="NavigateButtonStyle" TargetType="{x:Type Button}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Grid Width="Auto" Height="Auto">
							<Ellipse Fill="#FFBFC5CC" Stroke="#FFFFFFFF"/>
							<ContentPresenter/>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsKeyboardFocused" Value="true"/>
							<Trigger Property="ToggleButton.IsChecked" Value="true"/>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="#ADADAD"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="DeleteMagnetButtonStyle" TargetType="{x:Type Button}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="3" Background="{TemplateBinding Background}" ClipToBounds="True">
							<Grid Height="15.96">
								<Grid.RowDefinitions>
									<RowDefinition Height="0.531*"/>
									<RowDefinition Height="0.469*"/>
								</Grid.RowDefinitions>
								<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Grid.RowSpan="2"/>
							</Grid>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsKeyboardFocused" Value="true"/>
							<Trigger Property="ToggleButton.IsChecked" Value="true"/>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="#ADADAD"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>
	<Canvas x:Name="_root" Width="{Binding Path=ActualWidth, ElementName=UserControl, Mode=Default}" Height="{Binding Path=ActualHeight, ElementName=UserControl, Mode=Default}">
		<Canvas.Resources>
			<VisualBrush x:Key="DotFillBrush" TileMode="Tile" Viewport="0,0,10,10" ViewportUnits="Absolute" Viewbox="0,0,12,12" ViewboxUnits="Absolute" Stretch="Fill">
				<VisualBrush.Visual>
					<UniformGrid HorizontalAlignment="Left" VerticalAlignment="Top" Width="12" Height="12">
						<Ellipse Fill="#FF000000" StrokeThickness="1" Width="6" Height="6">
							<Ellipse.Stroke>
								<LinearGradientBrush EndPoint="0.5,0.745" StartPoint="0.5,0">
									<GradientStop Color="#EEFFFFFF" Offset="1"/>
									<GradientStop Color="#FFC1C1C1" Offset="0"/>
									<GradientStop Color="#FFC1C1C1" Offset="0.707"/>									
								</LinearGradientBrush>
							</Ellipse.Stroke>
						</Ellipse>
						<Ellipse Fill="#FF000000" StrokeThickness="1" Width="6" Height="6" Visibility="Hidden"/>
						<Ellipse Fill="#FF000000" StrokeThickness="1" Width="6" Height="6" Visibility="Hidden"/>
						<Ellipse Fill="#FF000000" StrokeThickness="1" Width="6" Height="6">
							<Ellipse.Stroke>
								<LinearGradientBrush EndPoint="0.5,0.745" StartPoint="0.5,0">
									<GradientStop Color="#EEFFFFFF" Offset="1"/>
									<GradientStop Color="#FFC1C1C1" Offset="0"/>
									<GradientStop Color="#FFC1C1C1" Offset="0.707"/>									
								</LinearGradientBrush>
							</Ellipse.Stroke>
						</Ellipse>
					</UniformGrid>
				</VisualBrush.Visual>
			</VisualBrush> 
		</Canvas.Resources>
		<Canvas.DataContext>
			<Binding Source="{StaticResource InstancesDataSource}"/>
		</Canvas.DataContext>
		<Border x:Name="ControlBackground" Width="{Binding Path=ActualWidth, ElementName=UserControl, Mode=Default}" Height="{Binding Path=ActualHeight, ElementName=UserControl, Mode=Default}">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FF5B5B5B" Offset="0"/>
					<GradientStop Color="#FFC1C1C1" Offset="1"/>
					<GradientStop Color="#FFC1C1C1" Offset="0.115"/>
					<GradientStop Color="#FFA8A8A8" Offset="0.062"/>
				</LinearGradientBrush>
			</Border.Background>
			<Rectangle Fill="{DynamicResource DotFillBrush}" Stroke="{x:Null}" Margin="0,8,0,17.5" Width="Auto"/>
		</Border>
		<StackPanel Margin="0,-60,0,0" x:Name="_header" Width="{Binding Path=ActualWidth, ElementName=Canvas, Mode=Default}" Height="40" Orientation="Horizontal">
			<Button RenderTransformOrigin="0.5,0.5" Margin="20,0,0,0" x:Name="_hideShowLibBut" Style="{DynamicResource _hideShowLibButStyle}" Content="Button" Cursor="Hand">
				<Button.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</Button.RenderTransform>
			</Button>
			<Button x:Name="_storeBt" Style="{DynamicResource TransparentButtonStyle}" BorderBrush="{x:Null}" Cursor="Hand" Opacity="0" Visibility="Hidden">
				<Border x:Name="border" Margin="30,0,0,0" VerticalAlignment="Center" Height="30.8" Background="#59000000" BorderBrush="#FFE9E9E9" BorderThickness="2" CornerRadius="17">
					<TextBlock Margin="15,0" VerticalAlignment="Center" FontFamily="Calibri" FontSize="14.667" Foreground="#FFE9E9E9" Text="Magnet store"/>
				</Border>
			</Button>
		</StackPanel>
		<Grid Width="{Binding Path=ActualWidth, ElementName=_root, Mode=Default}" Height="118">
			<Button x:Name="_previousBt" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{DynamicResource NavigateButtonStyle}" Height="17" Width="17" Cursor="Hand" Margin="5,0,0,18">
				<Path Fill="#FF444545" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0.5" Margin="3,0,3,0" RenderTransformOrigin="0.5,0.5" Data="M4.2425735,0 L4.2426019,2.3123189 8.8042519,2.3123189 8.8042519,4.2503188 4.2426257,4.2503188 4.2426519,6.3753304 0,3.2499298 z" VerticalAlignment="Center" Height="8" HorizontalAlignment="Center">
					<Path.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="1" ScaleY="1"/>
							<SkewTransform AngleX="0" AngleY="0"/>
							<RotateTransform Angle="0"/>
							<TranslateTransform X="0" Y="0"/>
						</TransformGroup>
					</Path.RenderTransform>
				</Path>
			</Button>
			<Button x:Name="_nextBt" HorizontalAlignment="Right" Margin="0,0,5,18" VerticalAlignment="Center" HorizontalContentAlignment="Center" Style="{DynamicResource NavigateButtonStyle}" Width="17" Height="17" Cursor="Hand">
				<Path Fill="#FF444545" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0.5" Margin="3,0,3,0" RenderTransformOrigin="0.5,0.5" Data="M4.2425735,0 L4.2426019,2.3123189 8.8042519,2.3123189 8.8042519,4.2503188 4.2426257,4.2503188 4.2426519,6.3753304 0,3.2499298 z" HorizontalAlignment="Center" VerticalAlignment="Center" Height="8">
					<Path.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="1" ScaleY="1"/>
							<SkewTransform AngleX="0" AngleY="0"/>
							<RotateTransform Angle="180"/>
							<TranslateTransform X="0" Y="0"/>
						</TransformGroup>
					</Path.RenderTransform>
				</Path>
			</Button>
			<Border x:Name="_magnetsListBorder" Margin="17,0,17,0" Width="Auto" Background="{x:Null}" ClipToBounds="True" HorizontalAlignment="Left">
				<ListBox x:Name="_magnetsList" IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Path=InstalledMagnets, Mode=Default}" ItemTemplate="{DynamicResource MagnetDataTemplate}" Background="{x:Null}" BorderBrush="{x:Null}" SelectedIndex="1" ItemContainerStyle="{DynamicResource ListBoxItemStyle1}" Style="{DynamicResource ListBoxStyle1}" ItemsPanel="{DynamicResource ItemsPanelTemplate1}" BorderThickness="0,0,0,0" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
			</Border>
		</Grid>
	</Canvas>
</UserControl>
